<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<table  class="tablesorter" >
    <thead>
        <tr>
            <th>Nom Pr&eacute;nom</th>
            <th>Adresse</th>
            <th>T&eacutel&eacute;phone</th>
            <th>Mobile</th>
            <th>Employeurs</th>
        </tr>
    </thead>
    <!--<tfoot><tr><td colspan="4"><div id="paging"><ul><li><a href="#"><span>Previous</span></a></li><li><a href="#" class="active"><span>1</span></a></li><li><a href="#"><span>2</span></a></li><li><a href="#"><span>3</span></a></li><li><a href="#"><span>4</span></a></li><li><a href="#"><span>5</span></a></li><li><a href="#"><span>Next</span></a></li></ul></div></tr></tfoot>-->



    <tbody>
        <c:forEach var="employe" items="${listEmploye}" varStatus="vs">
            <tr <c:if test="${vs.count %2==0}">class="alt"</c:if>>
                <td><a href="/employe/show.do?id=${employe.id}">${employe.nom}&nbsp;${employe.prenom}</a></td>

                <td>${employe.adresse}<br/>
                    ${employe.complementAdresse}<br/>
                    ${employe.codePostal} - ${employe.ville}
                </td>
                <td>${employe.telephone}</td>
                <td>${employe.mobile}</td>
                <td>
                    <c:forEach var="contrat" items="${employe.contrats}" varStatus="vs">
                        <a href="/contrat/show.do?id=${contrat.id}">${contrat.adherent.nomPrenom} </a><br/>

                    </c:forEach>


                </td>
            </tr>
        </c:forEach>

    </tbody>
</table>
<div id="pager" class="pager">
    <form>
        <img src="/img/first.png" class="first">
        <img src="/img/prev.png" class="prev">
        <input type="text" class="pagedisplay">
        <img src="/img/next.png" class="next">
        <img src="/img/last.png" class="last">
        <select class="pagesize">
            <option selected="selected" value="10">10</option>
            <option value="20">20</option>
            <option value="30">30</option>
            <option value="40">40</option>
        </select>
    </form>
</div>

</div>


<div class="submit-container" style=" clear: left;">

    <a href="/employe/index.do" class="submit-button">Revenir &agrave; l'acceuil</a>
</div>


<script>
    $(function() {


        $("table").tablesorter({widgets: ['zebra']}).tablesorterPager({container: $("#pager")});
    });

</script>